3.428 \(\int \frac{\cot ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx\)

Optimal. Leaf size=66 \[ -\frac{\cot ^3(c+d x)}{3 a^2 d}-\frac{2 \cot (c+d x)}{a^2 d}+\frac{\tanh ^{-1}(\cos (c+d x))}{a^2 d}+\frac{\cot (c+d x) \csc (c+d x)}{a^2 d} \]

[Out]

ArcTanh[Cos[c + d*x]]/(a^2*d) - (2*Cot[c + d*x])/(a^2*d) - Cot[c + d*x]^3/(3*a^2*d) + (Cot[c + d*x]*Csc[c + d*
x])/(a^2*d)

________________________________________________________________________________________

Rubi [A]  time = 0.126169, antiderivative size = 66, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 6, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {2708, 2757, 3767, 8, 3768, 3770} \[ -\frac{\cot ^3(c+d x)}{3 a^2 d}-\frac{2 \cot (c+d x)}{a^2 d}+\frac{\tanh ^{-1}(\cos (c+d x))}{a^2 d}+\frac{\cot (c+d x) \csc (c+d x)}{a^2 d} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^4/(a + a*Sin[c + d*x])^2,x]

[Out]

ArcTanh[Cos[c + d*x]]/(a^2*d) - (2*Cot[c + d*x])/(a^2*d) - Cot[c + d*x]^3/(3*a^2*d) + (Cot[c + d*x]*Csc[c + d*
x])/(a^2*d)

Rule 2708

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_), x_Symbol] :> Dist[a^p, Int[Sin[
e + f*x]^p/(a - b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0] && IntegersQ[m, p] &&
 EqQ[p, 2*m]

Rule 2757

Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Int[Expan
dTrig[(a + b*sin[e + f*x])^m*(d*sin[e + f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && EqQ[a^2 - b^2, 0] &
& IGtQ[m, 0] && RationalQ[n]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \frac{\cot ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac{\int \csc ^4(c+d x) (a-a \sin (c+d x))^2 \, dx}{a^4}\\ &=\frac{\int \left (a^2 \csc ^2(c+d x)-2 a^2 \csc ^3(c+d x)+a^2 \csc ^4(c+d x)\right ) \, dx}{a^4}\\ &=\frac{\int \csc ^2(c+d x) \, dx}{a^2}+\frac{\int \csc ^4(c+d x) \, dx}{a^2}-\frac{2 \int \csc ^3(c+d x) \, dx}{a^2}\\ &=\frac{\cot (c+d x) \csc (c+d x)}{a^2 d}-\frac{\int \csc (c+d x) \, dx}{a^2}-\frac{\operatorname{Subst}(\int 1 \, dx,x,\cot (c+d x))}{a^2 d}-\frac{\operatorname{Subst}\left (\int \left (1+x^2\right ) \, dx,x,\cot (c+d x)\right )}{a^2 d}\\ &=\frac{\tanh ^{-1}(\cos (c+d x))}{a^2 d}-\frac{2 \cot (c+d x)}{a^2 d}-\frac{\cot ^3(c+d x)}{3 a^2 d}+\frac{\cot (c+d x) \csc (c+d x)}{a^2 d}\\ \end{align*}

Mathematica [A]  time = 0.909655, size = 121, normalized size = 1.83 \[ \frac{\tan \left (\frac{1}{2} (c+d x)\right ) \left (\cot \left (\frac{1}{2} (c+d x)\right )+1\right )^4 \sec ^2\left (\frac{1}{2} (c+d x)\right ) \left (-9 \cos (c+d x)+5 \cos (3 (c+d x))+6 \left (\sin (2 (c+d x))+2 \sin ^3(c+d x) \left (\log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )\right )\right )\right )}{96 a^2 d (\sin (c+d x)+1)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]^4/(a + a*Sin[c + d*x])^2,x]

[Out]

((1 + Cot[(c + d*x)/2])^4*Sec[(c + d*x)/2]^2*(-9*Cos[c + d*x] + 5*Cos[3*(c + d*x)] + 6*(2*(Log[Cos[(c + d*x)/2
]] - Log[Sin[(c + d*x)/2]])*Sin[c + d*x]^3 + Sin[2*(c + d*x)]))*Tan[(c + d*x)/2])/(96*a^2*d*(1 + Sin[c + d*x])
^2)

________________________________________________________________________________________

Maple [B]  time = 0.164, size = 132, normalized size = 2. \begin{align*}{\frac{1}{24\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{3}}-{\frac{1}{4\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}}+{\frac{7}{8\,d{a}^{2}}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) }-{\frac{7}{8\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-1}}-{\frac{1}{d{a}^{2}}\ln \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) }-{\frac{1}{24\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-3}}+{\frac{1}{4\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^4*csc(d*x+c)^4/(a+a*sin(d*x+c))^2,x)

[Out]

1/24/d/a^2*tan(1/2*d*x+1/2*c)^3-1/4/d/a^2*tan(1/2*d*x+1/2*c)^2+7/8/d/a^2*tan(1/2*d*x+1/2*c)-7/8/d/a^2/tan(1/2*
d*x+1/2*c)-1/d/a^2*ln(tan(1/2*d*x+1/2*c))-1/24/d/a^2/tan(1/2*d*x+1/2*c)^3+1/4/d/a^2/tan(1/2*d*x+1/2*c)^2

________________________________________________________________________________________

Maxima [B]  time = 1.12086, size = 207, normalized size = 3.14 \begin{align*} \frac{\frac{\frac{21 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac{6 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac{\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac{24 \, \log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} + \frac{{\left (\frac{6 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac{21 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1\right )}{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}{a^{2} \sin \left (d x + c\right )^{3}}}{24 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*csc(d*x+c)^4/(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

1/24*((21*sin(d*x + c)/(cos(d*x + c) + 1) - 6*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + sin(d*x + c)^3/(cos(d*x +
c) + 1)^3)/a^2 - 24*log(sin(d*x + c)/(cos(d*x + c) + 1))/a^2 + (6*sin(d*x + c)/(cos(d*x + c) + 1) - 21*sin(d*x
 + c)^2/(cos(d*x + c) + 1)^2 - 1)*(cos(d*x + c) + 1)^3/(a^2*sin(d*x + c)^3))/d

________________________________________________________________________________________

Fricas [A]  time = 1.14882, size = 342, normalized size = 5.18 \begin{align*} -\frac{10 \, \cos \left (d x + c\right )^{3} - 3 \,{\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) \sin \left (d x + c\right ) + 3 \,{\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) \sin \left (d x + c\right ) + 6 \, \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 12 \, \cos \left (d x + c\right )}{6 \,{\left (a^{2} d \cos \left (d x + c\right )^{2} - a^{2} d\right )} \sin \left (d x + c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*csc(d*x+c)^4/(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/6*(10*cos(d*x + c)^3 - 3*(cos(d*x + c)^2 - 1)*log(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) + 3*(cos(d*x + c)^2
- 1)*log(-1/2*cos(d*x + c) + 1/2)*sin(d*x + c) + 6*cos(d*x + c)*sin(d*x + c) - 12*cos(d*x + c))/((a^2*d*cos(d*
x + c)^2 - a^2*d)*sin(d*x + c))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**4*csc(d*x+c)**4/(a+a*sin(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.37458, size = 173, normalized size = 2.62 \begin{align*} -\frac{\frac{24 \, \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right )}{a^{2}} - \frac{44 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 21 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 6 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1}{a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3}} - \frac{a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 6 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 21 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{a^{6}}}{24 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*csc(d*x+c)^4/(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-1/24*(24*log(abs(tan(1/2*d*x + 1/2*c)))/a^2 - (44*tan(1/2*d*x + 1/2*c)^3 - 21*tan(1/2*d*x + 1/2*c)^2 + 6*tan(
1/2*d*x + 1/2*c) - 1)/(a^2*tan(1/2*d*x + 1/2*c)^3) - (a^4*tan(1/2*d*x + 1/2*c)^3 - 6*a^4*tan(1/2*d*x + 1/2*c)^
2 + 21*a^4*tan(1/2*d*x + 1/2*c))/a^6)/d